﻿<%@ Page Title="教师管理" Language="C#" MasterPageFile="~/Manage/ManageWeb.Master" AutoEventWireup="true" CodeBehind="TeacherManage.aspx.cs" Inherits="无线打分网站.Manage.TeacherManage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function showdialog(id) {
            var arguments = new Array(id);
            var m = window.showModalDialog("TeacherEdit.aspx?id=" + id, "", "", "dialogHeight:400px,center:yes,resizable:no,status:no");
            if (m == undefined) {
                m = window.returnValue;
            }
            if (m != null) {
                //window.location.reload();
                document.getElementById("<%=HiddenField1.ClientID %>").value = "1";
                window.location.href = window.location.href;
                return true;
            }
            else
                return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Button ID="Button1" runat="server" Font-Size="1.1em" Height="35px" Text="添加新教师"
        Width="124px" OnClientClick="showdialog('')" />
    (新添加教师密码为888888)<br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
        EnableModelValidation="True" Font-Size="0.9em" ForeColor="#333333" Width="100%"
        OnRowDataBound="GridView1_RowDataBound" 
        onrowdeleting="GridView1_RowDeleting">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" />
            <asp:BoundField DataField="Name" HeaderText="姓名" />
            <asp:BoundField DataField="ExperimentID" HeaderText="课程名称" />            
            <asp:ButtonField Text="编辑" ButtonType="Button" />
            <asp:CommandField InsertVisible="False" ShowCancelButton="False" ShowDeleteButton="True"
                ButtonType="Button" />
        </Columns>
        <EmptyDataTemplate>
            当前无任何教师，请添加新教师
        </EmptyDataTemplate>
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
    </asp:GridView>
    <asp:HiddenField ID="HiddenField1" runat="server" Value="1" />
</asp:Content>
